﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QuanLyNhaHang.DataAccess
{
    class DALogin
    {
        DataAccess.SqlService service;
        public DALogin()
        {
            service = new SqlService();
        }

        public Boolean checkIDAndPasswork(String id, String password)
        {
            String sql = "Select COUNT(*) from TAI_KHOAN where TENTK = N'" + id + "' AND MK = N'"+password+"'";
            int i = (int)service.executeScalar(sql);
            if (i != 0)
            {
                return true;
            }
            return false;
        }
    }
}
